<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<div class="pageContent">
	<form method="post" action="${base}/core/rolesinfo/authsave.do" class="pageForm required-validate" onsubmit="return validateCallback(this, ${targetType}AjaxDone);">
		<!-- 来源页面，提交后刷新此页面 -->
	<input type="hidden" name="targetType" value="${targetType}">
	<input type="hidden" name="targetId" value="${targetId}">
		<input type="hidden" name="roleId" value="${entity.id }"/>
		<br>
		<br>
		<div class="pageHeader">
			<div>角色名：${entity.rolename}</div>
		</div>
		<table class="table" width="100%" layoutH="115">
 
			<tbody>
				<c:forEach var="item" items="${allAuthority}" varStatus="status">
				<!-- 每一行三条  TODO  权限规则应支持多选
				-->
				<c:if test="${(status.count-1)%3==0 }"><tr></c:if>
					<td> <input type="checkbox" name="authId"  value="${item.id}"/>
					${item.name}  <select name="authRule_${item.id}"  >
					<option value="">全部</option>
					<c:forEach var="rules" items="${allRules}" >
					<option value="${rules.id}">${rules.info}</option>
					</c:forEach>
					</select>
					</td>
					<c:if test="${status.count%3==0 }">
					</tr></c:if>
				</c:forEach>
			</tbody>
		</table>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div></li>
				<li>
					<div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
				</li>
			</ul>
		</div>
	</form>
</div>